package co.fitstart.admin.entity.report;

import java.math.BigDecimal;

/**
 * 平均课单价
 * @author haiyan_xiao
 *
 */
public class HourUnitPrice {
    /** 门店名称 */
    private String siteName;
    
    /** 总金额(元) */
    private Double totalAmount;
    
    /** 总课时 */
    private Long totalHour;
    
    /** 平均课单价 （元/课时）*/
    private Double unitPrice;
    
    public HourUnitPrice() {
        
    }
    
    public HourUnitPrice(String siteName, Long totalAmount, Long totalHour) {
        if(siteName != null && totalAmount != null && totalHour != null) {
            this.siteName = siteName;
            this.totalAmount = new BigDecimal(totalAmount).divide(new BigDecimal(100)).doubleValue();
            this.totalHour = totalHour;
            this.unitPrice = this.totalAmount/totalHour;
        }
    }
    
    public HourUnitPrice(Long totalAmount, Long totalHour) {
        if(totalAmount != null && totalHour != null) {
            this.totalAmount = new BigDecimal(totalAmount).divide(new BigDecimal(100)).doubleValue();
            this.totalHour = totalHour;
            this.unitPrice = this.totalAmount/totalHour;
        }
    }

    /**
     * @return the siteName
     */
    public String getSiteName() {
        return siteName;
    }

    /**
     * @return the totalAmount
     */
    public Double getTotalAmount() {
        return totalAmount;
    }

    /**
     * @return the totalHour
     */
    public Long getTotalHour() {
        return totalHour;
    }

    /**
     * @return the unitPrice
     */
    public Double getUnitPrice() {
        return unitPrice;
    }

    /**
     * @param siteName the siteName to set
     */
    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }

    /**
     * @param totalAmount the totalAmount to set
     */
    public void setTotalAmount(Double totalAmount) {
        this.totalAmount = totalAmount;
    }

    /**
     * @param totalHour the totalHour to set
     */
    public void setTotalHour(Long totalHour) {
        this.totalHour = totalHour;
    }

    /**
     * @param unitPrice the unitPrice to set
     */
    public void setUnitPrice(Double unitPrice) {
        this.unitPrice = unitPrice;
    }
}
